package com.spiro.test.net.common;

import java.io.IOException;
import java.util.Properties;

/**
 * Created by tz0643 on 2016/6/21.
 */
public class Configuration {
    private static Configuration ourInstance = new Configuration();

    public static Configuration getInstance() {
        return ourInstance;
    }

    private Configuration() {
    }

    private Properties properties = new Properties();

    public void init() throws IOException {
        this.properties.load(Thread.currentThread()
                .getContextClassLoader().getResourceAsStream("net.properties"));
    }

    public String getProperty(String name) {
        return this.properties.getProperty(name);
    }
}
